Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 5 - Ink Objects / Ink Objects Reference
Functions / Getting and Setting an Ink's Color


GXSetInkColor

You can use the GXSetInkColor function to assign a color to an ink object.

void GXSetInkColor(gxInk target, const gxColor *data);
target
A reference to the ink to assign the color to.
data
A pointer to a color structure containing the color to assign to the ink.
DESCRIPTION
The GXSetInkColor function assigns the color pointed to by the data parameter to the ink object referenced in the target parameter. If the color references a color set or color profile object, QuickDraw GX increases the owner count of the referenced object.

SPECIAL CONSIDERATIONS
If the color space of the color pointed to by the data parameter is gxNoSpace, this function posts a colorSpace_out_of_range error.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
ink_is_nil 
color_is_nil 
colorSpace_out_of_range(debugging version)
colorSet_access_restricted(debugging version)
colorProfile_access_restricted(debugging version)
Notices (debugging version) 
color_already_set 
SEE ALSO
Ink colors are introduced in the section "Color" beginning on page 5-7, and described fully in the chapter "Colors and Color-Related Objects" in this book.

To examine the color of an ink object, use the GXGetInkColor function, described in the previous section.

To assign a color to the ink object associated with a shape, use the GXSetShapeColor function, described on page 5-71.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996